package com.example.finalproject.User;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

public class User {

    @NotBlank(message = "用户名不能为空!")
    private String userName;

    @NotBlank(message = "密码不能为空!")
    @Length(min=10,max=20,message = "密码长度在10~20!")
    private String userPassWord;


    @Email(message = "邮箱格式不正确!")
    private  String email;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPassWord() {
        return userPassWord;
    }

    public void setUserPassWord(String userPassWord) {
        this.userPassWord = userPassWord;
    }



    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "User{" +
                "userName='" + userName + '\'' +
                ", userPassWord='" + userPassWord + '\'' +
                ", email='" + email + '\'' +
                '}';
    }
}
